Interaction class¶
Defined in
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
Full name: ReactiveUI.Binding.Interaction<T1, T2>
Modifiers: public
Summary¶
Represents an interaction between collaborating application components.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Class hierarchy
classDiagram
class Interaction~T1,T2~
class IInteraction~TInput, TOutput~ {
<>
}
IInteraction~TInput, TOutput~ <|.. Interaction~T1,T2~
Implements: IInteraction
Remarks¶
Interactions allow collaborating components in an application to ask each other questions. Typically, interactions allow a view model to get the user's confirmation from the view before proceeding with some operation.
By default, handlers are invoked in reverse order of registration. That is, handlers registered later are given the opportunity to handle interactions before handlers that were registered earlier.
Note that handlers are not required to handle an interaction. They can choose to ignore it, leaving it for some other handler to handle. The interaction's Handle method will throw an UnhandledInteractionException if no handler handles the interaction.
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Methods¶
| Name | Summary |
|---|---|
| RegisterHandler | Registers a synchronous interaction handler. |
| Handle | Handles an interaction and asynchronously returns the result. |
| GetHandlers | Gets all registered handlers by order of registration. |
| GenerateContext | Gets an interaction context which is used to provide information about the interaction. |